//对外暴露的常量路由
export const constantRoute = [
    {
        //登陆接口
        path: '/login',
        name: 'login',
        component: () => import('@/views/login/index.vue'),
        meta: {
            title: 'login',
            hidden: true,
            type:1, //1常量路由 2异步路由  99任意路由
        }
    },
    {
        //登陆成功后页面
        path: '/',
        name: 'layout',
        component: () => import('@/layout/index.vue'),
        meta: {
            title: '根目录',
            // hidden: false,
            type:1,
            keepAlive: true, // 主要代码
        },
        redirect: '/home',
        children: [
            {
                path: '/home',
                name: 'home',
                component: () => import('@/views/home/index.vue'),
                meta: {
                    title: '首页',
                    hidden: false,
                    type:1,
                },
            },
            {
                path: '/message',
                name: 'message',
                component:()=>import('@/views/tool/message/index.vue'),
                meta:{
                    title:'消息',
                    hidden: false,
                    type:1,
                }
            },
            
            {
                path: '/calc',
                name: 'calc',
                component:()=>import('@/views/tool/calc/index.vue'),
                meta:{
                    title:'计算器',
                    hidden: false,
                    type:1,
                }
            },
        ]
    },
    {
        path: '/404',
        name: 'NotFound',
        component: () => import('@/views/404/index.vue'),
        meta: {
            title: '404 - Page Not Found',
            hidden: true,
            type:1,
        },
    }, 
];
//异步路由
export const asnycRoute = [
    //***************销售交易*******************
    // 1、撮合交易
    {
        path: '/trade/tradeMatching',
        name: 'tradeMatching',
        component: () => import('@/views/trade/tradeMatching/index.vue'),
        meta: {
            title: '撮合交易',
            hidden: false,
            type:2,
        },
    },


    //***************系统模块*******************
    //----1、权限管理
    {
        path: '/system/acl/user',
        name: 'user',
        component: () => import('@/views/system/acl/user/index.vue'),
        meta: {
            title: '用户管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/system/acl/role',
        name: 'role',
        component: () => import('@/views/system/acl/role/index.vue'),
        meta: {
            title: '角色管理',
            hidden: false,
            type:2,
        }
    },
    {
        path: '/system/acl/menu',
        name: 'menu',
        component: () => import('@/views/system/acl/menu/index.vue'),
        meta: {
            title: '菜单管理',
            hidden: false,
            type:2,
        }
    },
    {
        path: '/system/acl/url',
        name: 'url',
        component: () => import('@/views/system/acl/url/index.vue'),
        meta: {
            title: '接口地址管理',
            hidden: false,
            type:2,
        }
    },
    //----2、参数配置
    {
        path: '/system/paramaint/dict',
        name: 'dict',
        component: () => import('@/views/system/paramaint/dict/index.vue'),
        meta: {
            title: '数据字典',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/system/paramaint/sysparam',
        name: 'sysparam',
        component: () => import('@/views/system/paramaint/sysparam/index.vue'),
        meta: {
            title: '系统参数',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/system/paramaint/setFlow',
        name: 'setFlow',
        component: () => import('@/views/system/paramaint/setFlow/index.vue'),
        meta: {
            title: '流程配置',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/flowCenter',
        name: 'flowCenter',
        component:()=>import('@/views/flow/flowCenter/index.vue'),
        meta:{
            title:'流程中心',
            hidden: false,
            type:2,
        }
    },
    {
        path: '/system/paramaint/holiday',
        name: 'holiday',
        component: () => import('@/views/system/paramaint/holiday/index.vue'),
        meta: {
            title: '节假日管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/dept',
        name: 'dept',
        component: () => import('@/views/data/dept/index.vue'),
        meta: {
            title: '部门管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/dealFlowAllot',
        name: 'dealFlowAllot',
        component: () => import('@/views/data/dealFlow/dealFlowAllot/index.vue'),
        meta: {
            title: '成交流水分配',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/interestRate',
        name: 'interestRate',
        component: () => import('@/views/data/manualRecord/interestRate/index.vue'),
        meta: {
            title: '利率互换保证金录入',
            hidden: false,
            type:2,
        },
    },{
        path: '/data/stockPoolType',
        name: 'stockPoolType',
        component: () => import('@/views/data/manualRecord/stockPoolType/index.vue'),
        meta: {
            title: '证券池类型维护',
            hidden: false,
            type:2,
        },
    },{
        path: '/data/controlPool',
        name: 'controlPool',
        component: () => import('@/views/data/manualRecord/controlPool/index.vue'),
        meta: {
            title: '证券池证券信息维护',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/accountPosition',
        name: 'accountPosition',
        component: () => import('@/views/data/accountPosition/index.vue'),
        meta: {
            title: '持仓账户管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/indexManage',
        name: 'indexManage',
        component: () => import('@/views/data/indexManage/index.vue'),
        meta: {
            title: '指标管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/resManage',
        name: 'resManage',
        component: () => import('@/views/data/resource/manage/index.vue'),
        meta: {
            title: '资源管理',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/data/riskItem',
        name: 'riskItem',
        component: () => import('@/views/data/riskItem/index.vue'),
        meta: {
            title: '风控项目配置',
            hidden: false,
            type:2,
        },
    },
    // ***************流程管理*******************
    {
        path: '/data/flowChart',
        name: 'flowChart',
        component: () => import('@/views/flow/flowChart/index.vue'),
        meta: {
            title: '流程管理',
            hidden: false,
            type:2,
        },
    },
    // ***************流程委托*******************
    {
        path: '/data/flowTrust',
        name: 'flowTrust',
        component: () => import('@/views/flow/flowTrust/index.vue'),
        meta: {
            title: '流程委托',
            hidden: false,
            type:2,
        },
    },
    // ***************流程业务*******************
    {
        path: '/flow/sysPermApply',
        name: 'sysPermApply',
        component: () => import('@/views/flow/flowManage/sysPermApply/index.vue'),
        meta: {
            title: '系统权限申请',
            hidden: false,
            type:2,
        },
    },
    // ***************系统管理*******************
    {
        path: '/system/paramaint/cache',
        name: 'cache',
        component: () => import('@/views/system/paramaint/cache/index.vue'),
        meta: {
            title: '系统缓存',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/system/paramaint/paramDefine',
        name: 'paramDefine',
        component: () => import('@/views/system/paramaint/paramDefine/index.vue'),
        meta: {
            title: '参数定义',
            hidden: false,
            type:2,
        },
    },
    //***************投资研究*******************
    //----1、宏观及大类资产
    {
        path: '/ras/mecoAsstCls',
        name: 'mecoAsstCls',
        component: () => import('@/views/ras/mecoAsstCls/index.vue'),
        meta: {
            title: '宏观及大类资产',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/ras/liquidAnalysis',
        name: 'liquidAnalysis',
        component: () => import('@/views/ras/liquidAnalysis/index.vue'),
        meta: {
            title: '流动性分析',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/ras/policyAnalysis',
        name: 'policyAnalysis',
        component: () => import('@/views/ras/policyAnalysis/index.vue'),
        meta: {
            title: '政策分析',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/ras/sentimentAnalysis',
        name: 'sentimentAnalysis',
        component: () => import('@/views/ras/sentimentAnalysis/index.vue'),
        meta: {
            title: '情绪分析（机构行为）',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/ras/pricingAnalysis',
        name: 'pricingAnalysis',
        component: () => import('@/views/ras/pricingAnalysis/index.vue'),
        meta: {
            title: '定价分析',
            hidden: false,
            type:2,
        },
    },
    //***************定期报告*******************
    //1、周度报告
    {
        path: '/ras/weekReport',
        name: 'weekReport',
        component: () => import('@/views/ras/weekReport/index.vue'),
        meta: {
            title: '周度报告',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/ras/interestRateAnalysis/bondLendData',
        name: 'bondLendData',
        component: () => import('@/views/ras/interestRateAnalysis/bondLendData/index.vue'),
        meta: {
            title: '债券借贷',
            hidden: false,
            type:2,
        },
    },
    //***************统计查询*******************
    // 1.业绩查询
    {
        path: '/report/perfStat/cbondTransaction',
        name: 'cbondTransaction',
        component: () => import('@/views/report/perfStat/cbondTransaction/index.vue'),
        meta: {
            title: '现券成交查询',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/report/dashboard',
        name: 'dashboard',
        component: () => import('@/views/report/dashboard/index.vue'),
        meta: {
            title: '业绩看板',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/report/dvReport',
        name: 'dvReport',
        component: () => import('@/views/report/dvReport/index.vue'),
        meta: {
            title: '当前国债期货dv统计',
            hidden: false,
            type:2,
        },
    },
    //***************风控*******************
    // 1.绩效评估
    {
        path: '/risk/performance',
        name: 'performance',
        component: () => import('@/views/risk/performance/index.vue'),
        meta: {
            title: '绩效评估',
            hidden: false,
            type:2,
        },
    },
    //风险监控
    {
        path: '/risk/monitor',
        name: 'monitor',
        component: () => import('@/views/risk/monitor/index.vue'),
        meta: {
            title: '风险监控',
            hidden: false,
            type:2,
        },
    },
    //风控指标方案管理
    {
        path: '/risk/post-event-template',
        name: 'post-event-template',
        component: () => import('@/views/risk/postEventTemplate/index.vue'),
        meta: {
            title: '事后监控配置',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/risk/post-event-template-report',
        name: 'post-event-template-report',
        component: () => import('@/views/risk/postEventTemplateReport/index.vue'),
        meta: {
            title: '事后监控报告',
            hidden: false,
            type:2,
        },
    },
    {
        path: '/risk/reportSum',
        name: 'reportSum',
        component: () => import('@/views/risk/reportSum/index.vue'),
        meta: {
            title: '风控周报',
            hidden: false,
            type:2,
        },
    },
    //***************综合管理*******************
    //----台账管理
    {
        path: '/manage/standingbook',
        name: 'standingbook',
        component: () => import('@/views/manage/standingbook/index.vue'),
        meta: {
            title: '台账管理',
            hidden: false,
            type:2,
        },
    },
    //----供应商管理
    {
        path: '/manage/supplier',
        name: 'supplier',
        component: () => import('@/views/manage/supplier/index.vue'),
        meta: {
            title: '供应商管理',
            hidden: false,
            type:2,
        },
    },
    //----物品管理
    {
        path: '/manage/item',
        name: 'item',
        component: () => import('@/views/manage/item/index.vue'),
        meta: {
            title: '物品管理',
            hidden: false,
            type:2,
        },
    },
];


//任一路由
export const anyRoute = 
    {
        //404页面
        path: '/:pathMatch(.*)*',
        name: 'any',
        redirect: '/home',
        meta: {
            title: '404',
            hidden: true,
            type:99,
        }
    };
